struct <%= class_name %>Socket < Amber::WebSockets::ClientSocket
  <%- @fields.each do |field| -%>
  channel "<%= field.name.underscore %>_room:*", <%= field.name.capitalize %>Channel
  <%- end -%>

  def on_connect
    # do some authentication here
    # return true or false, if false the socket will be closed
    true
  end
end
